import React from "react";
const Home = React.lazy(() => import("../views/home"));
const Login = React.lazy(() => import("../views/login"));
const ForgetPassword = React.lazy(
  () => import("../views/login/forgetPassword")
);
const ForgetPassword2 = React.lazy(
  () => import("../views/login/forgetPassword2")
);
const Register = React.lazy(() => import("../views/login/register"));
const My = React.lazy(() => import("../views/my"));
const MyMessage = React.lazy(() => import("../views/my/message"));
const MyMessageDateil = React.lazy(() => import("../views/my/message/detail"));
const AutoAnswer = React.lazy(() => import("../views/my/autoAnswer"));
const AdoptAdvice = React.lazy(() => import("../views/my/adoptAdvice"));
const MyProfile = React.lazy(() => import("../views/my/infomation/myProfile"));
const ChangeImage = React.lazy(
  () => import("../views/my/infomation/changeImage")
);

const Consultation = React.lazy(() => import("../views/consultation"));
const Consultationlist = React.lazy(
  () => import("../views/consultation/Consultationlist")
);
const Giftlist = React.lazy(() => import("../views/consultation/Giftlist"));
const Chat = React.lazy(() => import("../views/consultation/Chat"));
const HistoryConsultation = React.lazy(
  () => import("../views/consultation/HistoryConsultation")
);
const Comment = React.lazy(() => import("../views/consultation/Comment"));
const Patient = React.lazy(() => import("../views/consultation/Patient"));

/******************** 钱包 ***************************/
const MyWallet = React.lazy(() => import("../views/my/wallet/myWallet"));
const Withdrawal = React.lazy(() => import("../views/my/wallet/withdrawal"));
const Withdrawaling = React.lazy(
  () => import("../views/my/wallet/withdrawaling")
);
const WithdrawalRecords = React.lazy(
  () => import("../views/my/wallet/withdrawalRecords")
);
const BindInformation = React.lazy(
  () => import("../views/my/wallet/bindInformation")
);
const BindIDCard = React.lazy(() => import("../views/my/wallet/bindIDCard"));
const BindBankCard = React.lazy(
  () => import("../views/my/wallet/bindBankCard")
);
const MySearch =React.lazy(
  () => import("../views/my/search")
);
const MySearchResult =React.lazy(
  () => import("../views/my/search/result")
);
const PatientCircle =React.lazy(() => import("../views/patientCircle"));
const PatientCircleDetail =React.lazy(
  () => import("../views/patientCircle/detail")
);
/****************** 首页 ***********************/
export const homeRoutes = [
  {
    path: "/",
    element: <Home></Home>,
  },
];
/******************** 钱包 ***************************/
export const walletRoutes = [
  {
    path: "/my/wallet/mywallet",
    element: <MyWallet></MyWallet>,
    meta: {
      title: "我的钱包",
    },
  },
  {
    path: "/my/wallet/withdrawal",
    element: <Withdrawal></Withdrawal>,
    meta: {
      title: "H币提现",
    },
  },
  {
    path: "/my/wallet/withdrawaling",
    element: <Withdrawaling></Withdrawaling>,
    meta: {
      title: "提现中",
    },
  },
  {
    path: "/my/wallet/withdrawal/records",
    element: <WithdrawalRecords></WithdrawalRecords>,
    meta: {
      title: "提现记录",
    },
  },
  {
    path: "/my/wallet/bind/information",
    element: <BindInformation></BindInformation>,
    meta: {
      title: "绑定信息",
    },
  },
  {
    path: "/my/wallet/bind/IDcard",
    element: <BindIDCard></BindIDCard>,
    meta: {
      title: "绑定身份证",
    },
  },
  {
    path: "/my/wallet/bind/bankcard",
    element: <BindBankCard></BindBankCard>,
    meta: {
      title: "绑定银行卡",
    },
  },
];

/******************** 我的 ***************************/
export const MyRoutes = [
  {
    path: "/my",
    element: <My></My>,
    meta: {
      title: "首页（我的）",
    },
  },
  {
    path: "/my/message",
    element: <MyMessage></MyMessage>,
    meta: {
      title: "我的消息",
    },
  },
  {
    path: "/my/message/detail",
    element: <MyMessageDateil></MyMessageDateil>,
    meta: {
      title: "我的消息(详情)",
    },
  },
  {
    path: "/my/autoAnswer",
    element: <AutoAnswer></AutoAnswer>,
    meta: {
      title: "自动回复",
    },
  },
  {
    path: "/my/adoptAdvice",
    element: <AdoptAdvice></AdoptAdvice>,
    meta: {
      title: "被采纳建议",
    },
  },
  {
    path: "/my/infomation/myProfile",
    element: <MyProfile></MyProfile>,
    meta: {
      title: "我的资料",
    },
  },
  {
    path: "/my/infomation/changeImage",
    element: <ChangeImage></ChangeImage>,
    meta: {
      title: "设置形象照",
    },
  },
  ...walletRoutes,
];

/******************** 问诊 ***************************/
export const consultationRoutes = [
  {
    path: "/consultation",
    element: <Consultation></Consultation>,
    meta: {
      title: "首页(问诊)",
    },
  },
  {
    path: "/consultation/consultationlist",
    element: <Consultationlist></Consultationlist>,
    meta: {
      title: "问诊记录列表",
    },
  },
  {
    path: "/consultation/giftlist",
    element: <Giftlist></Giftlist>,
    meta: {
      title: "礼物列表",
    },
  },
  {
    path: "/consultation/chat",
    element: <Chat></Chat>,
    meta: {
      title: "聊天",
    },
  },
  {
    path: "/consultation/comment",
    element: <Comment></Comment>,
    meta: {
      title: "评价",
    },
  },
  {
    path: "/consultation/historyconsultation",
    element: <HistoryConsultation></HistoryConsultation>,
    meta: {
      title: "历史问诊",
    },
  },
  {
    path: "/consultation/patient/:userId",
    element: <Patient></Patient>,
    meta: {
      title: "患者",
    },
  },
  {
    path: "/my/search",
    element: <MySearch></MySearch>,
    meta: {
      title: "病友圈搜索",
    },
  },
  {
    path: "/my/search/result",
    element: <MySearchResult></MySearchResult>,
    meta: {
      title: "病友圈搜索结果",
    },
  },
];
/******************** 登录注册 ***************************/
export const loginRoutes = [
  {
    path: "/login",
    element: <Login></Login>,
    meta: {
      title: "登录",
    },
  },
  {
    path: "/forgetPassword",
    element: <ForgetPassword></ForgetPassword>,
    meta: {
      title: "忘记密码",
    },
  },
  {
    path: "/forgetPassword2",
    element: <ForgetPassword2></ForgetPassword2>,
    meta: {
      title: "忘记密码2",
    },
  },
  {
    path: "/register",
    element: <Register></Register>,
    meta: {
      title: "注册",
    },
  },
];
/******************** 病友圈 ***************************/
export const patientCircleRoutes = [
  {
    path: "/patient/circle",
    element: <PatientCircle></PatientCircle>,
    meta: {
      title: "病友圈首页",
    },
  },
  {
    path: "/patient/circle/detail",
    element: <PatientCircleDetail></PatientCircleDetail>,
    meta: {
      title: "病友圈详情页",
    },
  },
];
/********************* 总路由 *********************************/
export const Routes_List = homeRoutes.concat(
  MyRoutes,
  consultationRoutes,
  loginRoutes,
  patientCircleRoutes
);
